﻿using Infrastructure.DDD;
using System.ComponentModel.DataAnnotations.Schema;

namespace Application.Entities
{
    [Table("job_keyvalue")]
    public class KeyValue : Entity
    {
        [Column(TypeName = "varchar(100)")]
        public string Key { get; set; }
        [Column(TypeName = "varchar(150)")]
        public string Value { get; set; }
        [Column(TypeName = "varchar(50)")]
        public KeyValueType Type { get; set; }
    }

    public enum KeyValueType
    {
        /// <summary>
        /// 服务
        /// </summary>
        Server,
        /// <summary>
        /// 设置-通知
        /// </summary>
        SettingNotice,
    }
    public enum SettingKey
    {
        NoticeLimit = 0,
        EmailServer = 1,
        AppName = 2,
    }


    public class ServerContent
    {
        public bool IsOnline { get; set; }
        public DateTime FirstLaunchTime { get; set; }
        public DateTime LastLaunchTime { get; set; }
    }
}
